export default "uniform vec3 topColor;uniform vec3 bottomColor;uniform float radius;varying vec4 worldPosition;\n#define SRGB_TO_LINEAR(c) pow((c), vec3(2.2))\n#define LINEAR_TO_SRGB(c) pow((c), vec3(1.0 / 2.2))\n#define USE_DITHER\nfloat gradientNoise(in vec2 uv){const vec3 magic=vec3(0.06711056,0.00583715,52.9829189);return fract(magic.z*fract(dot(uv,magic.xy)));}void main(){float normalizedHeight=(worldPosition.y+radius)/(radius*2.);float ratio=smoothstep(0.,0.5,normalizedHeight);vec3 colorFromGradient=mix(SRGB_TO_LINEAR(bottomColor),SRGB_TO_LINEAR(topColor),ratio);vec3 color=LINEAR_TO_SRGB(colorFromGradient);\n#if defined (USE_DITHER)\ncolor+=(1./255.)*gradientNoise(gl_FragCoord.xy)-(0.5/255.);\n#endif\ngl_FragColor=vec4(color,1.);}"
